package com.top.mall.jetpack.vm

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.module.lemlin.http.HttpResponseBody
import com.module.lemlin.http.SubscribeViewModel
import com.top.mall.base.BaseViewModel
import com.top.mall.entity.CateListResponse
import com.top.mall.entity.HomeIndexResponse
import com.top.mall.jetpack.ma.GoodsManager
import com.top.mall.jetpack.ma.HomeManager

class HomeViewModel(application: Application) : BaseViewModel(application){


    private val mHomeManager: HomeManager = HomeManager()

    val homeIndexLiveData = MutableLiveData<HttpResponseBody<HomeIndexResponse>>()
    /**
     * 首页数据
     * */
    fun homeIndex() {
        setRxLifeScope(SubscribeViewModel(homeIndexLiveData)) {
            mHomeManager.homeIndex()
        }
    }
}